import {
  Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom'
import { customHistory } from './utils/history'
import './App.scss'
import Login from '@/pages/Login'
import Layout from '@/pages/Layout'

function App() {
  return (
    <Router history={customHistory}>
      <div className="app">
        <Switch>
          <Route exact path="/" render={() => <Redirect to="/home" />}></Route>
          <Route path="/home" component={Layout} />
          <Route path="/login" component={Login} />
        </Switch>
      </div>
    </Router>
  )
}

export default App
